extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[稀有]菊花镖"
	info = "从目标上下方造成的伤害提高20%，从目标(斜)后方造成的伤害提高40%\n[color=#DC143C]同时装备两件时可升级[/color]"
	price = 300
	att.atk = 60
	att.mgiAtk = 60
	att.spd = 0.3

func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"onAtkChara")

func onAtkChara(atkInfo:AtkInfo):
	var cha = atkInfo.hitCha
	if masCha.team == cha.team:return
	if masCha.team == 1:
		if masCha.cell.x > cha.cell.x:
			atkInfo.factor += 0.4
		if masCha.cell.x == cha.cell.x:
			atkInfo.factor += 0.2

func upgrade():
	name = "[color=#FFFF00][史诗]菊花镖"
	info = "从目标上下方造成的伤害提高20%，从目标(斜)后方造成的伤害提高40%"
	att.atk = 120
	att.mgiAtk = 120
	att.spd = 0.6


